<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
       <link rel="stylesheet" type="text/css" href="../../../css/aui.css" />
    <script src='../../../CommonTool/commonNetWork.js'></script>
    <script src="../../../script/jquery.js"></script>
    <script src="./AuditoryExpression.js"></script>
</head>
<style>
        .ImageInfoBody {
            height: 20vw;
            margin: 0 auto;
            border: solid 2px rgb(245, 243, 164);
        }
        @media (min-width: 1240px) and (orientation: landscape) {
            .row-margin {
                margin-top: 3%;
            }
        }  
</style>
<body>
    <header class="aui-bar aui-bar-nav" id="aui-header">
        <div class="aui-pull-left aui-btn" onclick="close_win();">
            <span class="aui-iconfont aui-icon-left"></span>返回
        </div>
        <div class="aui-title">基础-高级-情绪声音区辨</div>
    </header>
      <div class="aui-grid downBody" >
        <div class="aui-row row-margin">
            <div class="aui-col-xs-2"></div>
            <div class="aui-col-xs-3" class="container">
                <audio src="http://172.16.32.194/social/advanced/6-情绪声音识别/3/1.mp3" id="audioBodyInfoOne"
                    controls></audio>
                <img src="http://172.16.32.194/social/advanced/6-情绪声音识别/3/1.png" onclick="ClickAuditory('1')"
                    class="ImageInfoBody">
            </div>
            <div class="aui-col-xs-2"></div>
            <div class="aui-col-xs-3" class="container">
                <audio src="http://172.16.32.194/social/advanced/6-情绪声音识别/3/2.mp3" id="audioBodyInfoTwo"
                    controls></audio>
                <img src="http://172.16.32.194/social/advanced/6-情绪声音识别/3/2.png" onclick="ClickAuditory('2')"
                    class="ImageInfoBody">
        </div>
    </div>
    <div class="aui-row">
        <div class="aui-col-xs-2"></div>
        <div class="aui-col-xs-3" class="container">
            <audio src="http://172.16.32.194/social/advanced/6-情绪声音识别/3/3.mp3" id="audioBodyInfoThree"
                controls></audio>
            <img src="http://172.16.32.194/social/advanced/6-情绪声音识别/3/3.png" onclick="ClickAuditory('3')"
                class="ImageInfoBody">
        </div>
        <div class="aui-col-xs-2"></div>
        <div class="aui-col-xs-3" class="container">
            <audio src="http://172.16.32.194/social/advanced/6-情绪声音识别/3/4.mp3" id="audioBodyInfoFour"
                controls></audio>
            <img src="http://172.16.32.194/social/advanced/6-情绪声音识别/3/4.png" onclick="ClickAuditory('4')"
                class="ImageInfoBody">
    </div>
</div>
    </div>
          <div  class="footbar" >
            <p class="barLeft" onclick="toggleMenu()">第三关</p>
              <p class="barCenter">
                  <div id="InitialButton" style="float:left;margin-left:4%;" onclick="InitialClick()">
                      <img id="passImg" src="http://172.16.32.194/commonButton/加号.png" alt="">
                  </div> 
                      <div id="InitialButton1" style="float:left;margin-left:4%;display: none;" onclick="ShowInitialClick()">
                          <img id="passImg" src="http://172.16.32.194/commonButton/减号.png" alt="">
                      </div> 
                      <div id="InitialButton2" style="float:left; margin-left:3%;display: none;" >
                          <audio src="http://172.16.32.194/promptsound/点一点听一听.mp3"   id="audioBody"  controls autoplay ></audio>  
                          <img style="width: 2rem;height: 1.6rem;margin-top:12%" src="http://172.16.32.194/commonButton/播放2.png" alt="" onclick="ImgAudioClickAnswer()">
                      </div> 
                      <div id="InitialButton4" style="float:left;margin-left:4%;display: none;">
                          <img style="width: 2rem;height:2rem;margin-top:6%" src="http://172.16.32.194/commonButton/刷新1.png" alt=""  onclick="ResetClick()">
                      </div> 
                   </p>
                   <p class="barright">
                    <img  src="http://172.16.32.194/commonButton/回答问题.png" alt=""  class="BarBottom" onclick="go_forward();">
                </p>
                <p class="barright">
                    <img  src="http://172.16.32.194/commonButton/上一关.png" alt=""  class="BarBottom" onclick="next_forward();">
                </p>
          </div>
      </div>
      <div class="menu" id="menu">
        <div class="menu-item" onclick="goto_page(1)">第一关</div>
        <div class="menu-item" onclick="goto_page(2)">第二关</div>
        <div class="menu-item" onclick="goto_page(3)">第三关</div>
        <div class="menu-item" onclick="goto_page(4)">第四关</div>
        <div class="menu-item" onclick="goto_page(5)">第五关</div>
    </div>
</body>
</html>
<script>
    var token = "";
    var userid = "";
    var currentTimestamp = "";
    var operationName = "";
    var additionalInfo = "";
    var groupId = "";
    var scene = "基础";
    var sceneLevel = "高级";
    var courseType = "情绪声音区辨";
    var classSort = "3";
    var moodType="";
    var remarks = "听一听";
    var classType = "学习";
        apiready = function() {
        document.getElementById('audioBody').style.display='none'
        token = api.pageParam.token
        userid = api.pageParam.uid
        groupId = api.pageParam.groupId
        currentTimestamp = Date.now()
        operationName = 'ing'
        additionalInfo = ''
        CommonNetWork()
      }
      function go_forward(data){
        // 停止页面中所有的<audio>播放
        document.querySelectorAll('audio').forEach(audio => audio.pause());
        currentTimestamp = Date.now()
        operationName = 'end'
        additionalInfo = ''
        CommonNetWork()
          api.openWin({
              name: 'Auditory3Answer1',
              url:'./Auditory3Answer1.html',
              pageParam: {
                uid: userid,
                token:token,
                groupId:groupId
                },
              reload:true,
          })
      }
      function next_forward(){
        // 停止页面中所有的<audio>播放
        document.querySelectorAll('audio').forEach(audio => audio.pause());
        currentTimestamp = Date.now()
        operationName = 'end'
        additionalInfo = ''
        CommonNetWork()
          api.openWin({
              name: 'AuditoryExpression2',
              url:'./AuditoryExpression2.html',
              pageParam: {
                uid: userid,
                token:token,
                groupId:groupId
                },
              reload:true,
          })
      }
      function goto_page(number) {
        const pages = [
            "AuditoryExpression1",
            "AuditoryExpression2",
            "AuditoryExpression3",
            "AuditoryExpression4",
            "AuditoryExpression5",         
        ];

        var name = pages[number-1]
        var url = "./" + name + ".html"
 
        document.querySelectorAll('audio').forEach(audio => audio.pause());
        currentTimestamp = Date.now();
        operationName = "end";
        additionalInfo = "";
        CommonNetWork();
        api.openWin({
            name: name,
            url: url,
            pageParam: {
                uid: userid,
                token: token,
                groupId: groupId,
            },
            reload: true,
        });
    }
    function toggleMenu() {
        var menu = document.getElementById("menu");
        if (menu.style.display === "none" || menu.style.display === "") {
            menu.style.display = "block";
        } else {
            menu.style.display = "none";
        }
    }
</script>